package 集合.存对象;

import java.util.ArrayList;

public class 存电影 {
    public static void main(String[] args) {
        ArrayList<Movie> list =new ArrayList<>();
        list.add(new Movie("《回家的诱惑》",1000,"赵金麦"));
        list.add(new Movie("《缘之空》",1000,"张若楠"));
        System.out.println(list.get(0));//对象地址
        for (int i = 0; i < list.size(); i++) {
            Movie s=list.get(i);
            System.out.println("片名："+s.getName()+"评分："+s.getScores()+"主演："+s.getActor());
        }
    }
}
